﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Default2 : System.Web.UI.Page
{
    String selected = "1";
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
    {
        lblMa.Text = "Mã món";
        lblTen.Text = "Tên món";
        txtMa.Text = "";
        selected = "1";
    }
    protected void RadioButton2_CheckedChanged(object sender, EventArgs e)
    {
        lblMa.Text = "Mã menu";
        lblTen.Text = "Tên menu";
        lblMoTa.Text = "Mã Món";
        txtMa.Text = "";
        selected = "2";
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if(RadioButton2.Checked == true)
            selected = "2";
        else
            if (RadioButton3.Checked == true)
                selected = "3";
            else
                if (RadioButton4.Checked == true)
                    selected = "4";
                else
                    if (RadioButton5.Checked == true)
                        selected = "5";
                    else
                        if (RadioButton6.Checked == true)
                            selected = "6";
                        else
                            if (RadioButton7.Checked == true)
                                selected = "7";
                            else
                                if (RadioButton8.Checked == true)
                                    selected = "8";
                                

        Response.Redirect("FullSearchResult.aspx?Type="+ selected +"&Ma=" + txtMa.Text + "&Ten=" + txtTen.Text + "&MoTa=" + txtMoTa.Text);
    }
    protected void RadioButton3_CheckedChanged(object sender, EventArgs e)
    {
        lblMa.Text = "Mã món ăn ưa thích";
        lblTen.Text = "Tên món ăn ưa thích";
        txtMa.Text = "";
        selected = "3";
    }
    protected void RadioButton5_CheckedChanged(object sender, EventArgs e)
    {
        lblMa.Text = "Mã loại món";
        lblTen.Text = "Tên loại món";        
        txtMa.Text = "";
        selected = "5";
        
    }
    protected void RadioButton6_CheckedChanged(object sender, EventArgs e)
    {
        lblMa.Text = "Mã khách hàng";
        lblTen.Text = "Tên khách hàng";
        lblMoTa.Text = "Địa Chỉ";
        txtMa.Text = "";
        selected = "6";
    }
    protected void RadioButton7_CheckedChanged(object sender, EventArgs e)
    {
        lblMa.Text = "Mã hóa đơn";
        lblTen.Text = "Tên hóa đơn";
        txtMa.Text = "";
        selected = "7";
    }
    protected void RadioButton8_CheckedChanged(object sender, EventArgs e)
    {
        lblMa.Text = "Mã hóa đơn";
        lblTen.Text = "Tên hóa đơn";
        txtMa.Text = "";
        selected = "8";
    }
    protected void RadioButton4_CheckedChanged(object sender, EventArgs e)
    {
        lblMa.Text = "Mã menu ưa thích";
        lblTen.Text = "Tên menu ưa thích";
        txtMa.Text = "";
        selected = "4";
    }
}
